package com.qkm.xinguan.controller;

import com.qkm.xinguan.domain.transform.dto.HouseInfoDTO;
import com.qkm.xinguan.domain.transform.dto.OrderDTO;
import com.qkm.xinguan.response.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @author zfj
 * @date 2021/12/22 -11:37
 */
@RequestMapping("/business/orders")
@Api(value = "订单信息管理模块", tags = "订单信息管理接口")
public interface IOrderController {
	@PostMapping("/add")
	@ApiOperation(value = "添加订单信息", notes = "订单信息添加")
	Result addOrder(@RequestBody @Validated OrderDTO orderDTO, BindingResult result);

	@DeleteMapping("/delete/{tourist}/{houseId}")
	@ApiOperation(value = "删除订单", notes = "订单删除")
	Result deleteOrder(@PathVariable("tourist") Long tourist,@PathVariable("houseId") Long houseId);

	@GetMapping("/allOrder/{id}")
	@ApiOperation(value = "游客id找订单", notes = "游客id找订单")
	Result getAllOrderById(@PathVariable("id") Long id);

	@DeleteMapping("/clear/{tourist}")
	@ApiOperation(value = "清除订单", notes = "订单清除")
	Result clearOrder(@PathVariable("tourist") Long tourist);
}
